import {
    Controller,
    HttpService,
    Get,
    UseInterceptors,
    CacheInterceptor
} from '@nestjs/common'
import { RoleService } from './role.service'
@Controller('role')
// @UseInterceptors(CacheInterceptor)
export class RoleController {
    constructor(
        private readonly httpService: HttpService,
        private readonly RoleService: RoleService
    ) {}
    @Get()
    findAll() {
        return this.RoleService.category()
        // const data = this.httpService
        //     .get('/category')
        //     .toPromise()
        //     .then(v => v.data)

        // return data
    }

    // findAll(): any {
    //     const data = this.httpService
    //         .get('http://192.168.1.107/api/v1.0/category')
    //         .toPromise()
    //         .then(v => v.data)

    //     return data
    // }
}
